#include <iostream>
using namespace std;
template <class T>
T add(T t1, T t2){
    cout <<"template"<<endl;
    return t1 + t2;
}
template <class T1,class T2>
T1 add(T1 t1 ,T2 t2){
    cout<<"template2"<<endl;
    return t1 +t2;
}
void test(){
   double x = 9.1;
   int y =10;
   cout << add(x,y)<<endl;
   cout<< add(y,x)<<endl;

   cout << add<int,int>(x,y)<<endl;//模板二
   cout << add<int>(x,y)<<endl;//模板一
   cout << add<int>(y,x)<<endl;//模板二
}
int main()
{
    test();
    return 0;
}

